import service from "@/server";
import type { IOper } from "@/myTypes"


// 1、获取所有的管理员数据：
export const getOperator = () => service.get(
     "/admin/list"
);

// 2.删除单个管理员信息
export const removeOp = (adminid: string) => service.post("/admin/delete", { adminid })


// 3.修改单个管理员信息
export const getOperDetailApi = (adminname: string) => service.get("/admin/detail",{params:{adminname}})


// 4.管理员的添加
export const addOperApi = (data:IOper)=>service.post("/admin/add",data);


// 5、管理员修改
export const editOperApi = (data:IOper)=>service.post("/admin/update",data);


// 所有商品数
// /statistic/product
export const EventUsers = ()=>service.get("/statistic/product");

// 所有注册用户
///statistic/user
export const haigouuser = ()=>service.get("/statistic/user");
